<?php
class addAction extends rareAction{
	public function execute(){}
	public function executePost(){
		$page = $this->getPostParam('page',array());
		if(empty($page)) jsonReturn(0,'add fail!');
		$pageDao = new DaoPage();
		
		// get system date
		$now = date("Y-m-d H:i:s");
		$page['createTime'] = $page['updateTime'] = $now;
		
		$flag = $pageDao->insert($page);
		if($flag > 0){
			jsonReturn(1,'ok');
		}else{
			jsonReturn(1,'fail');
		}
	}
}
?>
